import request from '@/utils/request'


// 老人状态修改
export function changeUserStatus (opId, opStatus) {
  const data = {
    opId,
    opStatus
  }
  return request({
    url: '/manage/older/changeStatus',
    method: 'put',
    data: data
  })
}

// 查询老人个人信息列表
export function listOpeople (query) {
  return request({
    url: '/manage/older/list',
    method: 'get',
    params: query
  })
}

// 查询老人个人信息详细
export function getOpeople (opId) {
  return request({
    url: '/manage/older/' + opId,
    method: 'get'
  })
}

// 新增老人个人信息
export function addOpeople (data) {
  return request({
    url: '/manage/older',
    method: 'post',
    data: data
  })
}

// 修改老人个人信息
export function updateOpeople (data) {
  return request({
    url: '/persion/older',
    method: 'put',
    data: data
  })
}

// 删除老人个人信息
export function delOpeople (opId) {
  return request({
    url: '/manage/older/' + opId,
    method: 'delete'
  })
}
